package cn.itcast.nems.manager.icc.model;

import cn.hutool.core.lang.Assert;
import lombok.Data;

import java.io.Serializable;

/**
 * <p>
 * 字典查询参数DTO
 * </p>
 *
 * @author zhouwei
 * @since 2023/12/13 10:24 AM
 **/
@Data
public class DictionaryQueryModel implements Serializable {
    private Integer id;
    private String code ;
    private Integer parentId ;
    private String name ;
    private Integer state ;

    private DictionaryQueryModel() {}
    public static DictionaryQueryModel buildQueryCodeModel(Integer parentId , String code ) {
        Assert.notNull(parentId ,  "【调用字典接口】参数父节点ID不能为空！") ;
        DictionaryQueryModel queryDTO  =  new DictionaryQueryModel() ;
        queryDTO.setParentId(parentId);
        queryDTO.setCode(code);
        return queryDTO ;
    }
}
